package org.example.laboratorymanagement.mapper;

import org.apache.ibatis.annotations.*;
import org.example.laboratorymanagement.pojo.Teacher;

import java.util.List;

@Mapper
public interface TeacherMapper {

//    @Select("select id,username,name,password from teacher")
    List<Teacher> listTeachers(@Param("username")  String username, @Param("name") String name);

//    @Insert("insert into teacher(username, name, password) values (#{username},#{name},default)")
    void insert(Teacher teacher);


    void delete(List<Integer> ids);

    void update(Teacher teacher);

    @Select("select id,username,name,password from teacher where username = #{username} and password = #{password}")
    Teacher selectByUnAndPwd(Teacher teacher);

    @Select("select id,username,name,password from teacher where id = #{id}")
    Teacher selectById(Integer id);
}
